var str=[{"name":"1"},{"name":2}]
var obj=JSON.stringify(str);
//console.log(obj)

var json=JSON.parse(obj);
console.log(json)
console.log(typeof json)


for(var i=0;i<json.length;i++){
    console.log(json[i])
}
console.log("-----------------------")

for (a in json){
    console.log(json[a])
}